1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
#![allow(non_camel_case_types, non_snake_case)]
use crate::co;
use crate::decl::*;
use crate::kernel::ffi_types::*;
use crate::ole::privs::*;
use crate::prelude::*;
use crate::vt::*;
/// [`ITaskbarList4`](crate::ITaskbarList4) virtual table.
#[repr(C)]
pub struct ITaskbarList4VT {
pub ITaskbarList3VT: ITaskbarList3VT,
pub SetTabProperties: fn(COMPTR, HANDLE, u32) -> HRES,
}
com_interface! { ITaskbarList4: "c43dc798-95d1-4bea-9030-bb99e2983a1a";
/// [`ITaskbarList4`](https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-itaskbarlist4)
/// COM interface over [`ITaskbarList4VT`](crate::vt::ITaskbarList4VT).
///
/// Automatically calls
/// [`IUnknown::Release`](https://learn.microsoft.com/en-us/windows/win32/api/unknwn/nf-unknwn-iunknown-release)
/// when the object goes out of scope.
///
/// # Examples
///
/// ```no_run
/// use winsafe::{self as w, prelude::*, co};
///
/// let obj = w::CoCreateInstance::<w::ITaskbarList4>(
/// &co::CLSID::TaskbarList,
/// None,
/// co::CLSCTX::INPROC_SERVER,
/// )?;
/// # w::HrResult::Ok(())
/// ```
}
impl shell_ITaskbarList for ITaskbarList4 {}
impl shell_ITaskbarList2 for ITaskbarList4 {}
impl shell_ITaskbarList3 for ITaskbarList4 {}
impl shell_ITaskbarList4 for ITaskbarList4 {}
/// This trait is enabled with the `shell` feature, and provides methods for
/// [`ITaskbarList4`](crate::ITaskbarList4).
///
/// Prefer importing this trait through the prelude:
///
/// ```no_run
/// use winsafe::prelude::*;
/// ```
pub trait shell_ITaskbarList4: shell_ITaskbarList3 {
/// [`ITaskbarList4::SetTabProperties`](https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist4-settabproperties)
/// method.
fn SetTabProperties(&self,
hwnd_tab: &HWND,
stp_flags: co::STPFLAG,
) -> HrResult<()>
{
ok_to_hrresult(
unsafe {
(vt::<ITaskbarList4VT>(self).SetTabProperties)(
self.ptr(),
hwnd_tab.ptr(),
stp_flags.raw(),
)
},
)
}
}